package com.nf.action;

import com.nf.entity.WeatherMessage;
import com.nf.service.WeatherService;
import com.nf.service.WeatherServiceImpl;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class WeatherAction {
    private WeatherService weatherService=new WeatherServiceImpl();

    @ResponseBody
    @RequestMapping("/j")
    public WeatherMessage showJson(){
        return weatherService.getMessage();
    }
}
